/**
 * Created by renzhiqiang on 2017/5/23.
 */
import React from 'react'
import PropTypes from 'prop-types';
import {Input} from 'antd'
const search = ({onSearch}) => {
  const searchHandle = (evt) => {
    onSearch(evt.target.value||'');
  };
  return (
    <div style={{marginBottom:5,float: "right"}}>
      <span style={{paddingLeft:12,paddingRight:2}}>搜索:</span>
      <Input type='search' style={{width:200}} placeholder="关键字" onChange={searchHandle} />
    </div>
  )
};
search.propTypes = {
  onSearch: PropTypes.func,
};
export default search
